import request from "@/utils/request";

export function publish(data) {
  return request({
    url: '/post/post/publish',
    method: 'post',
    data
  })
}

export function getDetailInfoByPostId(data) {
  return request({
    url: '/post/post/query/detailInfoByPostId/' + data.postId,
    method: 'get',
    params: data
  })
}

export function deletePostById(data) {
  return request({
    url: '/post/post/delete/' + data.postId,
    method: 'delete',
    data
  })
}

export function updatePost(data) {
  return request({
    url: '/post/post/updatePost',
    method: 'put',
    data
  })
}

export function completePost(data) {
  return request({
    url: '/post/post/complete',
    method: 'put',
    data
  })
}
